"""
宏脚本 - 生成时间: 2025-10-09 16:36:14
总事件数: 51
"""

from pynput.keyboard import Key, Controller
import time

keyboard = Controller()

def play_macro():
    """执行录制的宏"""
    start_time = time.time()

    # 等待到 4116ms
    while (time.time() - start_time) < 4.116:
        time.sleep(0.001)
    keyboard.press('w')  # 按下 w

    # 等待到 4121ms
    while (time.time() - start_time) < 4.121:
        time.sleep(0.001)
    keyboard.press(Key.space)  # 按下 space

    # 等待到 4128ms
    while (time.time() - start_time) < 4.128:
        time.sleep(0.001)
    keyboard.release('w')  # 抬起 w

    # 等待到 4181ms
    while (time.time() - start_time) < 4.181:
        time.sleep(0.001)
    keyboard.release(Key.space)  # 抬起 space

    # 等待到 4601ms
    while (time.time() - start_time) < 4.601:
        time.sleep(0.001)
    keyboard.press(Key.backspace)  # 按下 backspace

    # 等待到 4669ms
    while (time.time() - start_time) < 4.669:
        time.sleep(0.001)
    keyboard.release(Key.backspace)  # 抬起 backspace

    # 等待到 4737ms
    while (time.time() - start_time) < 4.737:
        time.sleep(0.001)
    keyboard.press(Key.backspace)  # 按下 backspace

    # 等待到 4811ms
    while (time.time() - start_time) < 4.811:
        time.sleep(0.001)
    keyboard.release(Key.backspace)  # 抬起 backspace

    # 等待到 4826ms
    while (time.time() - start_time) < 4.826:
        time.sleep(0.001)
    keyboard.press('w')  # 按下 w

    # 等待到 4909ms
    while (time.time() - start_time) < 4.909:
        time.sleep(0.001)
    keyboard.release('w')  # 抬起 w

    # 等待到 4992ms
    while (time.time() - start_time) < 4.992:
        time.sleep(0.001)
    keyboard.press('s')  # 按下 s

    # 等待到 5067ms
    while (time.time() - start_time) < 5.067:
        time.sleep(0.001)
    keyboard.press('m')  # 按下 m

    # 等待到 5105ms
    while (time.time() - start_time) < 5.105:
        time.sleep(0.001)
    keyboard.release('s')  # 抬起 s

    # 等待到 5164ms
    while (time.time() - start_time) < 5.164:
        time.sleep(0.001)
    keyboard.press(Key.space)  # 按下 space

    # 等待到 5174ms
    while (time.time() - start_time) < 5.174:
        time.sleep(0.001)
    keyboard.release('m')  # 抬起 m

    # 等待到 5247ms
    while (time.time() - start_time) < 5.247:
        time.sleep(0.001)
    keyboard.press('s')  # 按下 s

    # 等待到 5262ms
    while (time.time() - start_time) < 5.262:
        time.sleep(0.001)
    keyboard.release(Key.space)  # 抬起 space

    # 等待到 5313ms
    while (time.time() - start_time) < 5.313:
        time.sleep(0.001)
    keyboard.press('h')  # 按下 h

    # 等待到 5351ms
    while (time.time() - start_time) < 5.351:
        time.sleep(0.001)
    keyboard.press('u')  # 按下 u

    # 等待到 5366ms
    while (time.time() - start_time) < 5.366:
        time.sleep(0.001)
    keyboard.release('s')  # 抬起 s

    # 等待到 5396ms
    while (time.time() - start_time) < 5.396:
        time.sleep(0.001)
    keyboard.release('h')  # 抬起 h

    # 等待到 5411ms
    while (time.time() - start_time) < 5.411:
        time.sleep(0.001)
    keyboard.release('u')  # 抬起 u

    # 等待到 5509ms
    while (time.time() - start_time) < 5.509:
        time.sleep(0.001)
    keyboard.press('o')  # 按下 o

    # 等待到 5562ms
    while (time.time() - start_time) < 5.562:
        time.sleep(0.001)
    keyboard.press(Key.space)  # 按下 space

    # 等待到 5592ms
    while (time.time() - start_time) < 5.592:
        time.sleep(0.001)
    keyboard.release('o')  # 抬起 o

    # 等待到 5667ms
    while (time.time() - start_time) < 5.667:
        time.sleep(0.001)
    keyboard.release(Key.space)  # 抬起 space

    # 等待到 6041ms
    while (time.time() - start_time) < 6.041:
        time.sleep(0.001)
    keyboard.press(Key.backspace)  # 按下 backspace

    # 等待到 6132ms
    while (time.time() - start_time) < 6.132:
        time.sleep(0.001)
    keyboard.release(Key.backspace)  # 抬起 backspace

    # 等待到 6304ms
    while (time.time() - start_time) < 6.304:
        time.sleep(0.001)
    keyboard.press(Key.backspace)  # 按下 backspace

    # 等待到 6394ms
    while (time.time() - start_time) < 6.394:
        time.sleep(0.001)
    keyboard.release(Key.backspace)  # 抬起 backspace

    # 等待到 6492ms
    while (time.time() - start_time) < 6.492:
        time.sleep(0.001)
    keyboard.press(Key.backspace)  # 按下 backspace

    # 等待到 6522ms
    while (time.time() - start_time) < 6.522:
        time.sleep(0.001)
    keyboard.release(Key.backspace)  # 抬起 backspace

    # 等待到 6573ms
    while (time.time() - start_time) < 6.573:
        time.sleep(0.001)
    keyboard.press(Key.backspace)  # 按下 backspace

    # 等待到 6657ms
    while (time.time() - start_time) < 6.657:
        time.sleep(0.001)
    keyboard.release(Key.backspace)  # 抬起 backspace

    # 等待到 6754ms
    while (time.time() - start_time) < 6.754:
        time.sleep(0.001)
    keyboard.press(Key.backspace)  # 按下 backspace

    # 等待到 6800ms
    while (time.time() - start_time) < 6.800:
        time.sleep(0.001)
    keyboard.release(Key.backspace)  # 抬起 backspace

    # 等待到 7939ms
    while (time.time() - start_time) < 7.939:
        time.sleep(0.001)
    keyboard.press(Key.shift_r)  # 按下 shift_r

    # 等待到 7962ms
    while (time.time() - start_time) < 7.962:
        time.sleep(0.001)
    keyboard.press('?')  # 按下 ?

    # 等待到 8059ms
    while (time.time() - start_time) < 8.059:
        time.sleep(0.001)
    keyboard.release(Key.shift_r)  # 抬起 shift_r

    # 等待到 8233ms
    while (time.time() - start_time) < 8.233:
        time.sleep(0.001)
    keyboard.press('w')  # 按下 w

    # 等待到 8306ms
    while (time.time() - start_time) < 8.306:
        time.sleep(0.001)
    keyboard.release('w')  # 抬起 w

    # 等待到 8397ms
    while (time.time() - start_time) < 8.397:
        time.sleep(0.001)
    keyboard.press('s')  # 按下 s

    # 等待到 8427ms
    while (time.time() - start_time) < 8.427:
        time.sleep(0.001)
    keyboard.press('m')  # 按下 m

    # 等待到 8502ms
    while (time.time() - start_time) < 8.502:
        time.sleep(0.001)
    keyboard.release('s')  # 抬起 s

    # 等待到 8517ms
    while (time.time() - start_time) < 8.517:
        time.sleep(0.001)
    keyboard.release('m')  # 抬起 m

    # 等待到 8553ms
    while (time.time() - start_time) < 8.553:
        time.sleep(0.001)
    keyboard.press(Key.space)  # 按下 space

    # 等待到 8651ms
    while (time.time() - start_time) < 8.651:
        time.sleep(0.001)
    keyboard.release(Key.space)  # 抬起 space

    # 等待到 8689ms
    while (time.time() - start_time) < 8.689:
        time.sleep(0.001)
    keyboard.press(Key.enter)  # 按下 enter

    # 等待到 8794ms
    while (time.time() - start_time) < 8.794:
        time.sleep(0.001)
    keyboard.release(Key.enter)  # 抬起 enter

    # 等待到 11339ms
    while (time.time() - start_time) < 11.339:
        time.sleep(0.001)
    keyboard.press(Key.f12)  # 按下 f12

    # 等待到 11388ms
    while (time.time() - start_time) < 11.388:
        time.sleep(0.001)
    keyboard.release(Key.f12)  # 抬起 f12


if __name__ == "__main__":
    print("开始执行宏...")
    time.sleep(2)  # 给你2秒准备时间
    play_macro()
    print("宏执行完成！")
